Optimal. Leaf size=73 \[ -\frac{c (A-3 B) \cos (e+f x)}{a f \sqrt{c-c \sin (e+f x)}}-\frac{(A-B) \sec (e+f x) (c-c \sin (e+f x))^{3/2}}{a c f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.274729, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.079, Rules used = {2967, 2855, 2646} \[ -\frac{c (A-3 B) \cos (e+f x)}{a f \sqrt{c-c \sin (e+f x)}}-\frac{(A-B) \sec (e+f x) (c-c \sin (e+f x))^{3/2}}{a c f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2967
Rule 2855
Rule 2646
Rubi steps
\begin{align*} \int \frac{(A+B \sin (e+f x)) \sqrt{c-c \sin (e+f x)}}{a+a \sin (e+f x)} \, dx &=\frac{\int \sec ^2(e+f x) (A+B \sin (e+f x)) (c-c \sin (e+f x))^{3/2} \, dx}{a c}\\ &=-\frac{(A-B) \sec (e+f x) (c-c \sin (e+f x))^{3/2}}{a c f}-\frac{(A-3 B) \int \sqrt{c-c \sin (e+f x)} \, dx}{2 a}\\ &=-\frac{(A-3 B) c \cos (e+f x)}{a f \sqrt{c-c \sin (e+f x)}}-\frac{(A-B) \sec (e+f x) (c-c \sin (e+f x))^{3/2}}{a c f}\\ \end{align*}
Mathematica [A] time = 0.207427, size = 44, normalized size = 0.6 \[ \frac{2 \sec (e+f x) \sqrt{c-c \sin (e+f x)} (-A+B \sin (e+f x)+2 B)}{a f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.644, size = 53, normalized size = 0.7 \begin{align*} 2\,{\frac{c \left ( -1+\sin \left ( fx+e \right ) \right ) \left ( -B\sin \left ( fx+e \right ) +A-2\,B \right ) }{\cos \left ( fx+e \right ) a\sqrt{c-c\sin \left ( fx+e \right ) }f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.50121, size = 235, normalized size = 3.22 \begin{align*} -\frac{2 \,{\left (\frac{2 \, B{\left (\sqrt{c} + \frac{\sqrt{c} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac{\sqrt{c} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}}{{\left (a + \frac{a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )} \sqrt{\frac{\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1}} - \frac{A{\left (\sqrt{c} + \frac{\sqrt{c} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}}{{\left (a + \frac{a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )} \sqrt{\frac{\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1}}\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.37219, size = 101, normalized size = 1.38 \begin{align*} \frac{2 \,{\left (B \sin \left (f x + e\right ) - A + 2 \, B\right )} \sqrt{-c \sin \left (f x + e\right ) + c}}{a f \cos \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{A \sqrt{- c \sin{\left (e + f x \right )} + c}}{\sin{\left (e + f x \right )} + 1}\, dx + \int \frac{B \sqrt{- c \sin{\left (e + f x \right )} + c} \sin{\left (e + f x \right )}}{\sin{\left (e + f x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.57594, size = 475, normalized size = 6.51 \begin{align*} -\frac{\frac{{\left (\sqrt{2} A \sqrt{c} + \sqrt{2} B \sqrt{c} - 4 \, B \sqrt{c}\right )} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )}{\sqrt{2} a - a} + \frac{2 \,{\left (\frac{B c \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right ) \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}{a} + \frac{B c \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )}{a}\right )}}{\sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c}} - \frac{4 \,{\left ({\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c}\right )} A c \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right ) -{\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c}\right )} B c \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right ) - A c^{\frac{3}{2}} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right ) + B c^{\frac{3}{2}} \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1\right )\right )}}{{\left ({\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c}\right )}^{2} + 2 \,{\left (\sqrt{c} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - \sqrt{c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + c}\right )} \sqrt{c} - c\right )} a}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]